//
//  HttpRequest.swift
//  FingerABC
//
//  Created by ming on 2025/2/26.
//

import Foundation

enum Doman {
    case dev
    case remote
    
    var url: String {
        switch self {
        case .dev:
            return "http://8.215.85.157:9303/degreeization/"
        case .remote:
            return "http://8.215.85.157:9303/degreeization/"
        }
    }
}

struct HttpRequest {
    var port: UInt
    var doman: Doman
    var target: HTTPTarget
    var method: NetManager.ConnectionType
    var url: String { self.doman.url + target.rawValue }
    
    init(doman: Doman, target: HTTPTarget, method: NetManager.ConnectionType = .GET, port: UInt = 8000) {
        self.doman = doman
        self.target = target
        self.port = port
        self.method = method
    }
}
